<template>
	<view class="load-page-frame" @touchmove.stop.prevent="" @click="close" v-if="show" :style="{
		opacity: opacity
	}">
		<image src="/static/loadPage/bg.png" class="bg" mode=""></image>
		
		<view class="img-frame">
			<image class="img1" src="/static/loadPage/logo.png" mode="widthFix"></image>
			<image class="img2" src="/static/loadPage/img_1.png" mode="widthFix"></image>
			<image class="img3" src="/static/loadPage/text_1.png" mode="widthFix"></image>
			<image class="img4" src="/static/loadPage/text_2.png" mode="widthFix"></image>
		</view>
		
	</view>
</template>

<script>
	export default {
		name:"loadPage",
		data() {
			return {
				show: true,
				opacity: 1,
			};
		},
		methods: {
			close() {
				this.opacity = 0
				setTimeout(() => {
					this.show = false
				}, 1000)
			}
		}
	}
</script>

<style lang="scss" scoped>
	.load-page-frame {
		position: fixed;
		top: 0;
		left: 0;
		width: 100vw;
		height: 100vh;
		z-index: 100;
		overflow: hidden;
		background-color: #fff;
		transition: all 1s;
		.bg {
			width: 100vw;
			height: 100vh;
			object-fit: cover;
			position: absolute;
		}
		.img-frame {
			width: 100vw;
			height: 100vh;
			position: absolute;
			display: flex;
			flex-direction: column;
			justify-content: center;
			align-items: center;
			.img1 {
				width: 218.4210526316rpx;
				animation: img1-move 1s;
			}
			@keyframes img1-move {
				0% {
					transform: translateY(-100%);
					opacity: 0;
				}
				100% {
					transform: translateY(0%);
					opacity: 1;
				}
			}
			.img2 {
				width: 140rpx;
				margin-top: 40rpx;
			}
			.img3 {
				width: 50rpx;
				margin-top: 40rpx;
				animation: img3-move 1s;
			}
			@keyframes img3-move {
				0% {
					transform: translateY(100%);
					opacity: 0;
				}
				100% {
					transform: translateY(0%);
					opacity: 1;
				}
			}
			.img4 {
				width: 218.4210526316rpx;
				margin-top: 150rpx;
				animation: img4-move 2s infinite;
			}
			@keyframes img4-move {
				0% {
					transform: scale(0.9);
				}
				50% {
					transform: scale(1.2);
				}
				100% {
					transform: scale(0.9);
				}
			}
		}
	}
</style>